<!--
{**
 * $Id: goodsCateJs.htm 7 2007-05-25 13:28:15Z gamezoom $
 * $Author: gamezoom $
 * $Date: 2007-05-25 13:28:15 +0000 (Fri, 25 May 2007) $
 * $Revision: 7 $
 * $HeadURL: http://jxcfortaobao.googlecode.com/svn/trunk/templates/www/goodsCateJs.htm $
 *}-->
{if $listValidGoodsCate}
	{class name=goodsCateFuns method=listValidGoodsCate assign=goods_cate_list}
{else}
	{class name=goodsCateFuns method=listGoodsCate assign=goods_cate_list}
{/if}

{literal}
<script language="javascript">
//<![CDATA[
var _GCA = new Array();
var _GCC = new Array(); // goods category childs id array

function _TGC(fid, id, title)
{
	this.fid = fid;
	this.id = id;
	this.title = title;
	this.childIds = new Array();
	
	if(fid > -1){
		if(!_GCC[fid]) _GCC[fid] = new Array();
		_GCC[fid].push(id);
	}
}
//]]>
</script>
{/literal}
<script language="javascript">
//<![CDATA[
_GCA[0] = new _TGC(-1, 0, 'root');
{foreach from=$goods_cate_list item=goods_cate}_GCA[{$goods_cate.id}] = new _TGC({$goods_cate.fid}, {$goods_cate.id}, '{$goods_cate.name}');
{/foreach}
//]]>
</script>